package com.jrtc.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jrtc.base.entity.bo.PatientExerciseprescription;
import com.jrtc.base.entity.vo.PatientCollectVo;
import com.jrtc.base.entity.vo.PrescriptionVo;
import com.jrtc.entity.vo.ExercisePrescriptionVo;
import com.jrtc.base.entity.vo.PatientExerciseprescriptionVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 患者运动处方表(PatientExerciseprescription)表服务接口
 *
 * @author makejava
 * @since 2022-03-21 17:32:51
 */
public interface PatientExerciseprescriptionService {

    /**
     * 通过ID查询单条数据
     *
     * @param favouriteId 主键
     * @return 实例对象
     */
    PatientExerciseprescription queryById(Integer favouriteId);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit 查询条数
     * @return 对象列表
     */
    List<PatientExerciseprescription> queryAllByLimit(int offset, int limit);
    
    IPage<PatientExerciseprescription> queryPatientExerciseprescriptionList(PatientExerciseprescription patientExerciseprescription);

    /**
     * 新增数据
     *
     * @param patientExerciseprescription 实例对象
     * @return 实例对象
     */
    PatientExerciseprescription insert(PatientExerciseprescription patientExerciseprescription);

    /**
     * 修改数据
     *
     * @param patientExerciseprescription 实例对象
     * @return 实例对象
     */
    PatientExerciseprescription update(PatientExerciseprescription patientExerciseprescription);

    /**
     * 通过主键删除数据
     *
     * @param favouriteId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer favouriteId);

    /**
     * 查询患者的运动处方记录
     * */
    public List<PatientExerciseprescriptionVo> selectPatientExerciseprescriptionList(Integer patientId) throws Exception;

    /**
     * 创建患者运动处方信息
     * */
    public int insertPatientExerciseprescription(Integer prescriptionId, Integer patientId) throws Exception;

    /**
     * 患者所有运动处方信息列表
     * */
    public ExercisePrescriptionVo allExercisePrescriptions(Integer patientId, String name) throws Exception;

    /**
     * 患者收藏的运动处方
     * */
    public List<PatientCollectVo> selectPatientCollect(Integer patientId) throws Exception;

    /**
     * 患者运动处方列表
     * */
    public List<PrescriptionVo> patientExercisePrescription(Integer id, String name) throws Exception;

    /**
     * 定制患者运动处方
     * */
    public int customMade(PatientExerciseprescription patientExerciseprescription, HttpServletRequest request) throws Exception;

    /**
     * 查询待修改的患者运动处方
     * */
    public PatientExerciseprescription selCustomMade(Integer id);

    /**
     * 修改患者运动处方
     * */
    public int saveCustomMade(PatientExerciseprescription patientExerciseprescription) throws Exception;
}